import { View, Text, Image} from '@tarojs/components'
import Taro, { useLoad } from '@tarojs/taro'
import Xiao from '../../images/消息.png'
import './my.css'
import home from './imgage/home-office-line.png'
import jian from './imgage/右箭头.png'
import car from './imgage/car-05.png'
import car1 from './imgage/car.png'
import fkjl from './imgage/fkjl.png'
import jfju from './imgage/jfju.png'
import shoucang from './imgage/shoucang.png'
import zufang from './imgage/zufang.png'
export default function Index() {
  useLoad(() => {
    console.log('Page loaded.')
  })
  let goCar = () => {
    console.log('跳转');

    Taro.navigateTo({
      url:'/pages/parkingspace/parkingspace',
      fail: (err) => {
        console.log(err)
      }
    })
  }

  let goHome = () => {
    Taro.navigateTo({
      url:'/pages/home/home',
      fail: (err) => {
        console.log(err)
      }
    })
  }

  return (
    <View id='my'>
      {/* 头部 */}
      <View id='header'>
        <View className='header-left'>
          <Image
            style={{ width: "75px", height: "75px", borderRadius: "50%" }}
            src='https://ts1.cn.mm.bing.net/th?id=OIP-C.T3QlVDfLahso5dNGpYti7gHaHT&w=177&h=185&c=8&rs=1&qlt=90&o=6&dpr=1.4&pid=3.1&rm=2'></Image>
          <View style={{ marginLeft: "10px" }}>
            <View>酿酒小鱼干</View>
            <Text>169****9089</Text>
          </View>
        </View>
        <View className='header-right'>
          <Image src={Xiao} style={{ width: "30px", height: '30px' }}></Image>
        </View>
      </View>
      <View id='main'>
        <View className='main-item'>
          <View className='mainLeft'>
            <Image src={home} style={{ width: "25px", height: '25px' }}></Image>
            <Text style={{ marginLeft: "10px" }} onClick={() => goHome()}>我的房屋</Text>
          </View>
          <Image src={jian} style={{ width: "20px", height: "20px", marginRight: "10px" }}></Image>
        </View>
        <View className='main-item' onClick={()=>{goCar()}}>
          <View className='mainLeft'>
            <Image src={car} style={{ width: "25px", height: '25px' }}></Image>
            <Text style={{ marginLeft: "10px" }}>我的车位</Text>
          </View>
          <Image src={jian} style={{ width: "20px", height: "20px", marginRight: "10px" }}></Image>
        </View>
        <View className='main-item'>
          <View className='mainLeft'>
            <Image src={car1} style={{ width: "25px", height: '25px' }}></Image>
            <Text style={{ marginLeft: "10px" }}>我的车辆</Text>
          </View>
          <Image src={jian} style={{ width: "20px", height: "20px", marginRight: "10px" }}></Image>
        </View>
        <View className='main-item'>
          <View className='mainLeft'>
            <Image src={zufang} style={{ width: "25px", height: '25px' }}></Image>
            <Text style={{ marginLeft: "10px" }}>我的租房</Text>
          </View>
          <Image src={jian} style={{ width: "20px", height: "20px", marginRight: "10px" }}></Image>
        </View>
        <View className='main-item'>
          <View className='mainLeft'>
            <Image src={shoucang} style={{ width: "25px", height: '25px' }}></Image>
            <Text style={{ marginLeft: "10px" }}>我的收藏</Text>
          </View>
          <Image src={jian} style={{ width: "20px", height: "20px", marginRight: "10px" }}></Image>
        </View>
      </View>
      <View className='footer'>
        <View className='main-item'>
          <View className='mainLeft'>
            <Image src={jfju} style={{ width: "25px", height: '25px' }}></Image>
            <Text style={{ marginLeft: "10px" }}>缴费记录</Text>
          </View>
          <Image src={jian} style={{ width: "20px", height: "20px", marginRight: "10px" }}></Image>
        </View>
        <View className='main-item'>
          <View className='mainLeft'>
            <Image src={fkjl} style={{ width: "25px", height: '25px' }}></Image>
            <Text style={{ marginLeft: "10px" }}>访客记录</Text>
          </View>
          <Image src={jian} style={{ width: "20px", height: "20px", marginRight: "10px" }}></Image>
        </View>
      </View>
    </View>
  )
}
